package org.jeecg.modules.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pz.cloud.framework.base.annotation.Select;
import com.pz.cloud.framework.base.model.Pageable;
import com.pz.cloud.framework.base.service.TableInterface;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.jeecgframework.poi.excel.annotation.Excel;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * @Description: 人员任职表
 * @Author: mzz
 */
@Data
@TableName("sys_user_position")
@EqualsAndHashCode(callSuper = false)
//@Accessors(chain = true)
@ApiModel(value = "sys_user_position对象", description = "人员任职记录表")
public class SysUserPosition extends Pageable implements TableInterface {
    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private String id;
    /**
     * 职务编码
     */
    @Excel(name = "职务编码", width = 15)
    @ApiModelProperty(value = "职务编码")
    private String postCode;
    /**
     * 职务名称
     */
    @Excel(name = "职务名称", width = 15)
    @ApiModelProperty(value = "职务名称")
    private String postName;
    /**
     * 职务分类
     */
    @ApiModelProperty(value = "职务分类 关联业务的表名")
    @Dict(dicCode = "position_category")
    private String category;
    /**
     * 职级
     */
    @Excel(name = "职级", width = 15,dicCode ="position_rank")
    @ApiModelProperty(value = "职级")
    @Dict(dicCode = "position_rank")
    private String postRank;
    /**
     * 公司id
     */
    @Excel(name = "用户id", width = 15)
    @ApiModelProperty(value = "用户id")
    @Select(expression = "user_id =:userId")
    private String userId;
    /**
     * 用户姓名
     */
    @Excel(name = "用户姓名", width = 15)
    @ApiModelProperty(value = "用户姓名")
    private String userName;

    @ApiModelProperty(value = "在职状态 0在职 1离职")
    private Integer postStatus;
    /**
     * 任职开始时间
     */
    @ApiModelProperty(value = "任职开始时间")
    @Excel(name = "任职开始时间", width = 15)
    private Date beginTime;
    /**
     * 任职结束时间
     */
    @ApiModelProperty(value = "任职结束时间")
    @Excel(name = "任职结束时间", width = 15)
    private Date endTime;


}
